﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net.Sockets;
using System.Threading;
using System.Net;
using Server.MessageModule;
using Server.MessageModule.Message;
using Server.MessageModule.MessageProcessor;
using Server.Network;
using Server.ChartLog;
using System.Drawing.Drawing2D;
using Server.Core;

namespace Server
{
    class Program
    {

        private static Manager _manager;
        private static ClientManager _clientManager;

        static void Main(string[] args)
        {

            
            // Init manager
            _manager = new Manager();
            _manager.init();

            ChartDisplay chart = new ChartDisplay();
            (_manager.MessageDispatcher.getProcessor(ShareMacro.MESSAGETYPE_SENSOR) as SensorProcessor)._chart = chart;
            
            
            
            // init client manager
            _clientManager = new ClientManager();
            _clientManager.MessageDispatcher = _manager;

            _clientManager.start();
            chart.ShowDialog();
            Console.ReadLine();
        }
    }
}
